package _工具包整理._枚举类;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

public enum TaskTypeEnum {

    EXPENSE_SYNC(1, "expense sync"),
    EXPENSE_IMPORT_AA(2, "expense import LX"),
    EXPENSE_IMPORT_BB(2, "expense import KT");

    @JsonValue
    @EnumValue
    public final Integer id;
    public final String name;

    TaskTypeEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public static TaskTypeEnum getEnum(Integer ruleId){
        for (TaskTypeEnum value : TaskTypeEnum.values()) {
            if (value.getId().equals(ruleId)){
                return value;
            }
        }
        return null;
    }

}
